package com.cloud.drore.eboss.supplier.service.impl;

import com.cloud.drore.eboos.common.base.BaseServiceImpl;
import com.cloud.drore.eboos.common.base.MyMapper;
import com.cloud.drore.eboos.common.base.ResultMessage;
import com.cloud.drore.eboss.operation.supplierApiService.IMerchantSupplierApiService;
import com.cloud.drore.eboss.supplier.entity.vo.RefundOrderDicVo;
import com.cloud.drore.eboss.supplier.service.IBaseDataFeign;
import com.cloud.drore.eboss.supplier.service.ISupplierRefundOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 浙江卓锐科技股份有限公司 版权所有  Copyright 2018<br>
 *
 * @Description: <br>
 * @Project: eboos <br>
 * @CreateDate: Created in 2018/2/2 14:27 <br>
 * @Author: <a href="575842778@qq.com">郑永涛</a>
 */
@Service
public class SupplierRefundOrderServiceImpl extends BaseServiceImpl implements ISupplierRefundOrderService {

    @Autowired
    IBaseDataFeign baseDataFeign;
    @Resource
    IMerchantSupplierApiService merchantSupplierApiService;

    private static String PRODUCT_TYPE = "PRODUCT_TYPE";

    private static String ORDER_STATUS = "ORDER_STATUS";

    private static String REFUND_TYPE = "REFUND_TYPE";

    private static String PAYMENT_WAY = "PAYMENT_WAY";

    @Override
    public MyMapper getMapper() {
        return null;
    }

    /**
     * @ClassName: SupplierRefundOrderServiceImpl
     * @param
     * @Return: com.cloud.drore.eboos.common.base.ResultMessage
     * @Decription: 初始化信息
     * @CreateDate: Created in 2018/2/2 14:31
     * @Author: <a href="575842778@qq.com">郑永涛</a>
     * @Modify:
     */
    public ResultMessage getDicInfo(){
        RefundOrderDicVo refundOrderDicVo = new RefundOrderDicVo();
        refundOrderDicVo.setDistributorList(merchantSupplierApiService.selectMerchantListDistributor());
        // 产品类型
        refundOrderDicVo.setProductType(baseDataFeign.getDicListMapByCodeVo(PRODUCT_TYPE));
        // 订单状态
        refundOrderDicVo.setOrderStatus(baseDataFeign.getDicListMapByCodeVo(ORDER_STATUS));
        // 退款类型
        refundOrderDicVo.setRefundType(baseDataFeign.getDicListMapByCodeVo(REFUND_TYPE));
        // 支付方式
        refundOrderDicVo.setPaymentWay(baseDataFeign.getDicListMapByCodeVo(PAYMENT_WAY));
        return new ResultMessage(refundOrderDicVo);
    }

}